package com.wasai.domain;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.MappedSuperclass;
import javax.persistence.OneToMany;

@MappedSuperclass
public abstract class AbstractUser extends BaseDomain {
	/**
	 * 
	 */
	private static final long serialVersionUID = 8290759839125460597L;
	private String avatar;
	private Set<Comment> comments;
	private String email;
	private String name;
	private String password;
	private String qq;

	@Column(name = "avatar", length = 250)
	public String getAvatar() {
		return avatar;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "user")
	public Set<Comment> getComments() {
		return comments;
	}

	@Column(name = "email", length = 100)
	public String getEmail() {
		return email;
	}

	@Column(name = "name", length = 50)
	public String getName() {
		return name;
	}

	@Column(name = "password", length = 250)
	public String getPassword() {
		return password;
	}

	@Column(name = "qq", length = 250)
	public String getQq() {
		return qq;
	}

	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}

	public void setComments(Set<Comment> comments) {
		this.comments = comments;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}
}
